🎖️GitЯра🎖️
Commit 77e30b60e144858f6b5b56e5b21203162af9ba2d
Parents : 520fa71
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-04-10T16:34:38-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-04-10T21:34:38Z
chore(build): enable AboutLibraries offlineMode by default (#5054)
Changes
5 files changed, 22 insertions(+), 19 deletions(-)
Diff
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 905fe78c1d..77687a105b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -285,7 +285,7 @@ jobs:
env:
ORG_GRADLE_PROJECT_appVersionName: ${{ needs.prepare-build-info.outputs.APP_VERSION_NAME }}
APPIMAGE_EXTRACT_AND_RUN: 1
- run: ./gradlew :desktop:packageReleaseDistributionForCurrentOS --no-daemon
+ run: ./gradlew :desktop:packageReleaseDistributionForCurrentOS -PaboutLibraries.release=true --no-daemon
- name: List Desktop Binaries
if: runner.os == 'Linux'
diff --git a/AGENTS.md b/AGENTS.md
index b5aa22fb77..ed603d08ab 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -92,6 +92,7 @@ Meshtastic-Android is a Kotlin Multiplatform (KMP) application for off-grid, dec
- **Networking:** Pure **Ktor** — no OkHttp anywhere. Engines: `ktor-client-android` for Android, `ktor-client-java` for desktop/JVM. Use Ktor `Logging` plugin for HTTP debug logging (not OkHttp interceptors). `HttpClient` is provided via Koin in `app/di/NetworkModule` and `core:network/di/CoreNetworkAndroidModule`.
- **Image Loading (Coil):** Use `coil-network-ktor3` with `KtorNetworkFetcherFactory` on **all** platforms. `ImageLoader` is configured in host modules only (`app` via Koin `@Single`, `desktop` via `setSingletonImageLoaderFactory`). Feature modules depend only on `libs.coil` (coil-compose) for `AsyncImage` — never add `coil-network-*` or `coil-svg` to feature modules.
- **Dependencies:** Check `gradle/libs.versions.toml` before assuming a library is available.
+- **AboutLibraries:** Runs in `offlineMode` by default (no GitHub/SPDX API calls). Release builds pass `-PaboutLibraries.release=true` via Fastlane properties (Android) or Gradle CLI (desktop) to enable remote license/funding fetching. Do NOT re-gate on `CI` or `GITHUB_TOKEN` alone — that burns API calls on every PR check.
- **JetBrains fork aliases:** Version catalog aliases for JetBrains-forked AndroidX artifacts use the `jetbrains-*` prefix (e.g., `jetbrains-lifecycle-runtime-compose`, `jetbrains-navigation3-ui`). Plain `androidx-*` aliases are true Google AndroidX artifacts. Never mix them up in `commonMain`.
- **Compose Multiplatform:** Version catalog aliases for Compose Multiplatform artifacts use the `compose-multiplatform-*` prefix (e.g., `compose-multiplatform-material3`, `compose-multiplatform-foundation`). Never use plain `androidx.compose` dependencies in common Main.
- **Room KMP:** Always use `factory = { MeshtasticDatabaseConstructor.initialize() }` in `Room.databaseBuilder` and `inMemoryDatabaseBuilder`. DAOs and Entities reside in `commonMain`.
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index e3278923ca..77302534ea 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -316,16 +316,16 @@ dependencies {
}
aboutLibraries {
- // Fetch full license text + funding info from GitHub API when on CI with a token
- val isCi =
- providers
- .gradleProperty("ci")
- .map { it.toBoolean() }
- .getOrElse(providers.environmentVariable("CI").map { it.toBoolean() }.getOrElse(false))
+ // Run offline by default to avoid burning GitHub API calls on every build.
+ // Release builds pass -PaboutLibraries.release=true to fetch full license text + funding info.
+ val isReleaseBuild = providers.gradleProperty("aboutLibraries.release").map { it.toBoolean() }.getOrElse(false)
val ghToken = providers.environmentVariable("GITHUB_TOKEN")
+
+ offlineMode = !isReleaseBuild
+
collect {
- fetchRemoteLicense = isCi && ghToken.isPresent
- fetchRemoteFunding = isCi && ghToken.isPresent
+ fetchRemoteLicense = isReleaseBuild && ghToken.isPresent
+ fetchRemoteFunding = isReleaseBuild && ghToken.isPresent
if (ghToken.isPresent) {
gitHubApiToken = ghToken.get()
}
diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts
index c22cbc0458..6c4239a0f4 100644
--- a/desktop/build.gradle.kts
+++ b/desktop/build.gradle.kts
@@ -227,16 +227,16 @@ dependencies {
}
aboutLibraries {
- // Fetch full license text + funding info from GitHub API when on CI with a token
- val isCi =
- providers
- .gradleProperty("ci")
- .map { it.toBoolean() }
- .getOrElse(providers.environmentVariable("CI").map { it.toBoolean() }.getOrElse(false))
+ // Run offline by default to avoid burning GitHub API calls on every build.
+ // Release builds pass -PaboutLibraries.release=true to fetch full license text + funding info.
+ val isReleaseBuild = providers.gradleProperty("aboutLibraries.release").map { it.toBoolean() }.getOrElse(false)
val ghToken = providers.environmentVariable("GITHUB_TOKEN")
+
+ offlineMode = !isReleaseBuild
+
collect {
- fetchRemoteLicense = isCi && ghToken.isPresent
- fetchRemoteFunding = isCi && ghToken.isPresent
+ fetchRemoteLicense = isReleaseBuild && ghToken.isPresent
+ fetchRemoteFunding = isReleaseBuild && ghToken.isPresent
if (ghToken.isPresent) {
gitHubApiToken = ghToken.get()
}
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index e4b607871e..4fff2f8704 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -38,7 +38,8 @@ platform :android do
task: "assembleFdroidRelease",
properties: {
"android.injected.version.name" => ENV['VERSION_NAME'],
- "android.injected.version.code" => ENV['VERSION_CODE']
+ "android.injected.version.code" => ENV['VERSION_CODE'],
+ "aboutLibraries.release" => "true"
}
)
end
@@ -50,7 +51,8 @@ platform :android do
print_command: false,
properties: {
"android.injected.version.name" => ENV['VERSION_NAME'],
- "android.injected.version.code" => ENV['VERSION_CODE']
+ "android.injected.version.code" => ENV['VERSION_CODE'],
+ "aboutLibraries.release" => "true"
}
)
lane_context[SharedValues::GRADLE_AAB_OUTPUT_PATH]
Served by rngit 1.5.0 - Generated in 0.11s